
#ifndef __SIMU_H__
#define __SIMU_H__

#include <iostream>
#include "../logger.h"
#include "rasp_simu.h"

typedef struct buffer_node {
    bool valid;
    int len;
    char *data;
    struct buffer_node *next;
} buffer_node_t;

typedef struct buffer_table {
    int count;
    buffer_node_t **list;
} buffer_table_t;

typedef struct param_info {
    bool is_struct;
    std::string name;
    std::string type;
    void *addr;
    int size;
} param_info_t;

class Simu {
public:
    Simu();
    ~Simu();
    void onCompute(buffer_table_t *input, buffer_table_t *output);
    bool Init();

public:
    int EchoLen = 1000000;
    int TargetNum = 1;
    float FrPt = 500;
    float FrFs = 20;
    int FrNum = 16; //8;
    float FrFre = 3000;
    float FrPw = 800;
    float FrBw = 1;
    int FrType = 0;
    float TargetRCS1 = 40;
    float TargetRCS2 = 40;
    int TargetRCSType1 = 0;
    int TargetRCSType2 = 0;
    float TargetRange1 = 30000;
    float TargetRange2 = 35000;
    float TargetVel1 = 100;
    float TargetVel2 = -100;
    float NoiseRcs = 1;
    float AddNoise = 0;
    std::string BeamAmpFilePath = "./data/BeamAmp.bin";

private:
    Rasp_Simu rasp_simu;
    int SubFrType = FrType;
    float SubFrBw = FrBw;
    float SubFrPw = FrPw;
    float SubFrPt = FrPw;
    float SubFrFs = FrFs;
    float SubFrFre = FrFre;
};

#endif //SIMU_TEST_PROJECT
